<template>
  <!-- 面包屑 -->
  <div class="crumbBox">
    <template v-for="(item, index) in navs" :key="index">
      <a href="#">{{ item.name }}</a>
      <!-- 只显示index = navs.length - 1的 / -->
      <template v-if="index < navs.length - 1">/</template>
    </template>
  </div>
</template>

<script setup lang="ts">
import { ref } from "vue";
const props = defineProps(["navs"]);
</script>

<style lang="less" scoped>
.crumbBox {
  line-height: 40px;
  a {
    text-decoration: none;
    color: #000;
    margin: 0 5px;
  }
}
</style>
